package com.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author: tgy
 * @Date: 2020-07-30 11:07
 */
//@Data
@AllArgsConstructor
public class Dog implements InitializingBean, DisposableBean {

    private String name;
    private int age;

    public Dog(){

        System.out.println("dog init");
    }


    public Dog(int age, String name){


        this(name,age);
    }

    @Override
    public void afterPropertiesSet() throws Exception {

        System.out.println(" afterProperties dog init");
    }


    public void initDog(){

        System.out.println("initDog");
    }

    @Override
    public void destroy() throws Exception {

        System.out.println("dog destroy");
    }

    public void destroyBean(){

        System.out.println("dog destroy bean");
    }
}
